size = int(input("请输入三角形最长边的长度："))
print("左下角三角形如下：\n")
i = 0
while i < size:
    print('*\t' * (i + 1))
    i += 1
print()

print("右下角三角形如下：")
i = 0
while i < size:
    print('\t' * (size - i - 1) + '*\t' * (i + 1))
    i += 1
print()

print("左上角三角形如下：")
i = size
while i > 0:
    print('*\t' * i)
    i -= 1
print()

print("右上角三角形如下：")
i = size
while i > 0:
    print('\t' * (size - i) + '*\t' * i)
    i -= 1
print()